using System;
using System.Collections.Generic;

using PlugNT.Common;
using PlugNT.Cms.Custom;
using PlugNT.Cms.BLL;
using PlugNT.Cms.Model;
using PlugNT.App.Bbs.Model;

namespace PlugNT.App.Bbs
{




    public class BbsConfig 
    {

        public const string assName = "BBS";
        public const string assVersion = "3.6";

        public readonly static bool assSetuped = false;
        public readonly static int sysModelId = 0;

        private static BbsModelInfo _bbsModelInfo = null;
        

        static BbsConfig()
        {
            assSetuped = AppPlugin.GetAppModel("PlugNT.App.Bbs").setuped;
            sysModelId = AppPlugin.GetAppModel("PlugNT.App.Bbs").sysModelId;
        }


        public static BbsModelInfo GetBbsModelInfo()
        {
            if (_bbsModelInfo == null)
            {
                _bbsModelInfo = (BbsModelInfo)SysModel.GetSysModelInfoFromDictionary(sysModelId);
            }
            return _bbsModelInfo;
        }

        public static bool SetBbsModelInfo(string arr)
        {
            _bbsModelInfo.arr_str = arr;
            _bbsModelInfo.ArrBind();
            return new SysModel().UpdateArr(sysModelId, arr);
        }

    }


}

